/*
 * @Author: WangShuai 1830773767@qq.com
 * @Date: 2025-06-23 23:42:02
 * @LastEditors: WangShuai 1830773767@qq.com
 * @LastEditTime: 2025-06-29 05:49:56
 * @FilePath: \shangyitong\src\api\user\type.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export interface ResponseData {
    code: number,
    message: string,
    ok: boolean
}
//用户登录接口需要携带的参数类型
export interface LoginData {
    phone: string,
    code: string
}
//登录接口返回用户信息数据
export interface UserInfo {
    name: string,
    token: string
}
//登录接口返回的数据的ts类型
export interface UserLoginResponse extends ResponseData {
    data: UserInfo
}

//定义获取微信登录相关参数ts类型
export interface WXLogin {
    redirectUri: string
    appid: string
    scope: string
    state: string
}

//定义微信登录接口返回数据类型
export interface WXLoginResponseData extends ResponseData {
    data: WXLogin
}

//提交订单接口返回数据类型ts
export interface SubmitOrder extends ResponseData {
    data: number
}

//获取订单详情
export interface OrderInfo {
    "id": number,
    "createTime": string,
    "updateTime": string,
    "isDeleted": number,
    "param": {
        "orderStatusString": string
    },
    "userId": number,
    "outTradeNo": string,
    "hoscode": string,
    "hosname": string,
    "depcode": string,
    "depname": string,
    "scheduleId": string,
    "title": string,
    "reserveDate": string,
    "reserveTime": number,
    "patientId": number,
    "patientName": string,
    "patientPhone": string,
    "hosRecordId": string,
    "number": number,
    "fetchTime": string,
    "fetchAddress": string,
    "amount": number,
    "quitTime": string,
    "orderStatus": number
}
//定义订单接口返回的数据ts类型
export interface OrderResponseData extends ResponseData {
    data: OrderInfo
}

//获取二维码接口返回的数据ts类型
export interface PayInfo {
    "codeUrl": string,
    "orderId": number,
    "totalFree": number,
    "resultCode": string
}

export interface QrCode extends ResponseData {
    data: PayInfo
}
//插叙支付结果的ts类型
export interface PayResult extends ResponseData {
    data: boolean
}

//获取当前用户信息接口ts 类型
export interface UserInfo {
    "id": number,
    "createTime": string,
    "updateTime": string,
    "isDeleted": number,
    "param": {
    },
    "openid": null,
    "nickName": null,
    "phone": string,
    "name": string,
    "certificatesType": string,
    "certificatesNo": string,
    "certificatesUrl": null,
    "authStatus": number,
    "status": number
}
//获取用户信息接口返回的数据的ts类型
export interface UserInfoResponseData extends ResponseData {
    data: UserInfo
}

//代表证件类型的数据ts
export interface Param { }

export interface CertificationType {
    id: number;
    createTime: string;
    updateTime: string;
    isDeleted: number;
    param: Param;
    parentId: number;
    name: string;
    value: string;
    dictCode: string;
    hasChildren: boolean;
}
export type CertifiCationArr = CertificationType[]
export interface CertificationTypeResoponse extends ResponseData {
    data: CertifiCationArr
}

//用认证携带的参数TS

export interface UserParams {
    "certificatesType": string,
    "certificatesNo": string,
    "certificatesUrl": string,
    "name": string;
}

//获取用户订单接口数据ts类型

export interface Param {
    orderStatusString: string;
}
//定义每条订单数据ts而类型
export interface OrderDataInfo {
    id: number;
    createTime: string;
    updateTime: string;
    isDeleted: number;
    param: Param;
    userId: number;
    outTradeNo: string;
    hoscode: string;
    hosname: string;
    depcode: string;
    depname: string;
    scheduleId?: any;
    title: string;
    reserveDate: string;
    reserveTime: number;
    patientId: number;
    patientName: string;
    patientPhone: string;
    hosRecordId: string;
    number: number;
    fetchTime: string;
    fetchAddress: string;
    amount: number;
    quitTime: string;
    orderStatus: number;
}
//定义订单列表数组
export type Records = OrderDataInfo[]
//用户订单接口返回数据ts类型
export interface OrderInfoResponseData extends ResponseData {
    data: {
        records: OrderDataInfo[];
        total: number;
        size: number;
        current: number;
        orders: any[];
        hitCount: boolean;
        searchCount: boolean;
        pages: number;
    }
}


//获取所有有就诊人 信息
export interface Param {
    certificatesTypeString: string;
    contactsCertificatesTypeString?: any;
    cityString?: any;
    fullAddress: string;
    districtString?: any;
    provinceString?: any;
}

export interface UserInfoData {
    id: number;
    createTime: string;
    updateTime: string;
    isDeleted: number;
    param: Param;
    userId: number;
    name: string;
    certificatesType: string;
    certificatesNo: string;
    sex: number;
    birthdate: string;
    phone: string;
    isMarry: number;
    provinceCode?: any;
    cityCode?: any;
    districtCode?: any;
    address: string;
    contactsName: string;
    contactsCertificatesType: string;
    contactsCertificatesNo: string;
    contactsPhone: string;
    isInsure: number;
    cardNo?: any;
    status: string;
}
//获取所有就诊人接口返回数据ts类型
export interface UserInfoDataResponseData extends ResponseData {
    data: UserInfoData[];
}
//每一条订单状态的数据ts类型
export interface OrderStatusData {
    comment: string;
    status: number;
}
//获取所有订单状态接口返回ts类型
export interface OrderStatusResponseData extends ResponseData {
    data: OrderStatusData[];
}

//定义获取城市数据ts类型
export interface Param { }
export interface CityData {
    id: number;
    createTime: string;
    updateTime: string;
    isDeleted: number;
    param: Param;
    parentId: number;
    name: string;
    value: string;
    dictCode?: any;
    hasChildren: boolean;
}
export type CityDataArr = CityData[]
//获取城市接口返回数据ts类型
export interface CityDataResponse extends ResponseData {
    data: CityData[];
}

//新增或则修改就诊人 参数数据ts类型
export interface Partient {
    id?: string,
    name: string,    
    certificatesType: string,//证件类型
    certificatesNo: string,//证件号码
    sex: number,
    birthdate: string,
    phone: string,
    isMarry: number,
    isInsure: number,//医保1 自费 0
    addressSelected:string[],//住址
    address: string,//详细地址     
    // cardNo: string,    
    // cityCode: string,
    contactsName: string,//联系人名字
    contactsCertificatesNo: string,//联系人证件类号码
    contactsCertificatesType: string, // 联系人证件类型
    contactsPhone: string,//联系人电话号码
    // createTime: string,
    // districtCode: string,    
    // isDeleteu: number,    
    // param:{}
    // provinceCode: string,    
    // status: string,
    // updateTime: string,
    // userId: number
}

